<!doctype html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1, user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style" />
	<meta content="telephone=no" name="format-detection" />
	<meta name="description" />
	<link rel="icon" href="/favicon.ico" type="image/x-icon" />
	<title>经销商分润管理系统</title> 

   	<link href="__CSS__/mui.min.css" rel="stylesheet"> 
    <link href="__CSS__/alertify.core.css" rel="stylesheet" type="text/css">
    <link href="__CSS__/alertify.default.css" rel="stylesheet" type="text/css">
    <link href="__CSS__/font-awesome.min.css" rel="stylesheet" /> 
	<link href="__CSS__/default.manager.css" rel="stylesheet" type="text/css" />
 	<link href="__CSS__/app.css" rel="stylesheet"/> 
    <link href="__CSS__/SkinConfig-Black.css" rel="stylesheet"  type="text/css"/> 
    <link href="__CSS__/user.css" rel="stylesheet"> 
    
    <script type="text/javascript" src="__JS__/jquery.2.1.4.min.js"></script>
    <!-- <script type="text/javascript" src="__JS__/jquery-1.11.3.min.js"></script> -->
   	<script type="text/javascript" src="__JS__/mtcache/mt.cache.js"></script>
   	<script type="text/javascript" src="__JS__/vue.min.js"></script>   
    <script type="text/javascript" src="__JS__/lib/alertify.js"></script> 
	<script type="text/javascript" src="__JS__/lib/jquery.qrcode.min.js"></script>  
    <script type="text/javascript"  src="__JS__/lib/exif.js"></script> 
    <script type="text/javascript"  src="__JS__/lib/mobileFix.mini.js"></script> 
    <script type="text/javascript"  src="__JS__/mt.compress-1.1.js"></script> 
    <script type="text/javascript"  src="__JS__/mui.min.js"></script>   
 	<script>
		var ajaxCacheTime = 30; 
 	</script>
 	<style>
 	.mui-card .mui-control-content {
		padding: 10px;
	} 
	.mui-pull-bottom-tips {
		text-align: center;
		background-color: #efeff4;
		font-size: 15px;
		line-height: 40px;
		color: #777;
	}
	.mui-slider-indicator.mui-segmented-control{
		margin-top:10px;
		padding: 0 15px;
	}
	.mui-fullscreen .mui-segmented-control~.mui-slider-group{
		top: 60px;
	}
	.mui-segmented-control.mui-scroll-wrapper .mui-scroll{
		width:100%;
	}
	.mui-segmented-control.mui-scroll-wrapper .mui-control-item{
		display:block;
		width: 50%;
    	float: left;
	}
	#sliderSegmentedControl .mui-control-item.mui-active {
	    color: #EBEBEB;
	    background: #333;
	}
	.mui-ellipsis{
		font-size: 0.3rem;
	}
	.mui-table-view .mui-media-object{
		line-height: 65px;
    	max-width: 65px;
    	height: 65px;
	}
	.yongjin{
		height: 65px;
	    line-height: 65px;
	    color: #E80B0B;
	    font-weight: bold;
	    font-size: 1rem;
	}
	.my-icon{
		font-size: 0.5rem;
	}
	.mui-ellipsis{
		font-size: 0.8rem;
	}
 	</style>
</head>
<body id="app" class="mui-android mui-android-6 mui-android-6-0 mui-fullscreen" style="text-size-adjust: 100%;">
	<header class="mui-bar mui-bar-nav ">
        <span class="mui-icon mui-icon-back mui-pull-left"></span>
        <h1 class="mui-title title">佣金记录</h1> 
    </header>
    <div class="mui-content">  
		<div id="slider" class="mui-slider mui-fullscreen"> 
			<div id="sliderSegmentedControl" class="mui-scroll-wrapper mui-slider-indicator mui-segmented-control mui-segmented-control-inverted">
				<div class="mui-scroll mui-segmented-control">
					<a class="mui-control-item mui-active" href="#item1mobile">
						首充返利
					</a>
					<a class="mui-control-item" href="#item2mobile">
						采购返利
					</a> 
				</div>
			</div>
			<div class="mui-slider-group">
				<div id="item1mobile" class="mui-slider-item mui-control-content mui-active">
					<div id="scroll1" class="mui-scroll-wrapper">
						<div class="mui-scroll">
							<ul class="mui-table-view" id="item1mobile_ul">
								 
							</ul>
						</div>
					</div>
				</div>
				<div id="item2mobile" class="mui-slider-item mui-control-content">
					<div class="mui-scroll-wrapper">
						<div class="mui-scroll">
							<ul class="mui-table-view" id="item2mobile_ul">
								  
							</ul>
						</div>
					</div>
				</div> 
			</div>
		</div> 
	</div> 
</body> 
<script src="__JS__/mui.pullToRefresh.js"></script>
<script src="__JS__/mui.pullToRefresh.material.js"></script>
<script type="text/javascript"> 
 
mui.init();
var p = 1;
jzsj(p);
var p1 = 1;
jzsj1(p1);
(function($) { 
	//阻尼系数 
	var deceleration = mui.os.ios?0.003:0.0009;
	$('.mui-scroll-wrapper').scroll({
		bounce: false,
		indicators: true, //是否显示滚动条
		deceleration:deceleration
	});
	$.ready(function() {
		//循环初始化所有下拉刷新，上拉加载。
		$.each(document.querySelectorAll('.mui-slider-group .mui-scroll'), function(index, pullRefreshEl) {
			$(pullRefreshEl).pullToRefresh({
				down: {
					callback: function() {
						var self = this;
						if(index == 0){
							p = p+1;
							jzsj(p);
						}
						if(index == 1){
							p1 = p1+1;
							jzsj1(p1);
						}
						self.endPullUpToRefresh();
					}
				},
				up: {
					callback: function() {
						var self = this;
						if(index == 0){
							p = p+1;
							jzsj(p);
						} 
						if(index == 1){
							p1 = p1+1;
							jzsj1(p1);
						}	
						self.endPullUpToRefresh();
					}
				}
			});
		}); 
	});
})(mui); 

function jzsj(p){
	var html = ''; 
	$.post("{:url('user/scflAjax')}",{p:p},function(data){
		if ($.isEmptyObject(data)) {
			$(".mui-pull-bottom-tips").find(".mui-pull-loading").html("--没有更多了--");
			return false;
		} 
		for(var i=0 in data){ 
			html += '<li class="mui-table-view-cell mui-media">';
			html += '<a href="javascript:;">';
			html += '<img class="mui-media-object mui-pull-left" src="'+data[i]['daili']['ysz']+'">';
			html += '<div class="mui-media-body">';
			html += '<div style="width:65%;float:left;">';
			html += data[i]['daili']['dlname']+'（电话：'+data[i]['daili']['dl_phone']+'）';
			html += '<p class="mui-ellipsis">首充金额：'+data[i]['daili']['scje']+'</p>';
			html += '<p class="mui-ellipsis">返现比例：'+data[i]['fxbl']+'%</p>';
			html += '</div>';
			html += '<div style="width:35%;float:left;">';
			html += '<p class="yongjin"><span class="my-icon">￥</span>'+data[i]['cz_flje']+'</p>';
			html += '</div>';
			html += '</div>';
			html += '</a>';
			html += '</li>';
		}
		$("#item1mobile_ul").append(html);
	});  
}

function jzsj1(p){
	var html = ''; 
	$.post("{:url('user/cgflAjax')}",{p:p},function(data){
		if ($.isEmptyObject(data)) {
			$(".mui-pull-bottom-tips").find(".mui-pull-loading").html("--没有更多了--");
			return false;
		}  
		for(var i=0 in data){ 
			html += '<li class="mui-table-view-cell mui-media">';
			html += '<a href="javascript:;">';
			html += '<img class="mui-media-object mui-pull-left" src="'+data[i]['daili']['ysz']+'">';
			html += '<div class="mui-media-body">';
			html += '<div style="width:65%;float:left;">';
			html += data[i]['daili']['dlname']+'（电话：'+data[i]['daili']['dl_phone']+'）';
			html += '<p class="mui-ellipsis">采购个数：'+data[i]['cggs']+'</p>';
			html += '<p class="mui-ellipsis">返现单价：'+data[i]['fldj']+'</p>';
			html += '</div>';
			html += '<div style="width:35%;float:left;">';
			html += '<p class="yongjin"><span class="my-icon">￥</span>'+data[i]['cg_flje']+'</p>';
			html += '</div>';
			html += '</div>';
			html += '</a>';
			html += '</li>';
		}
		$("#item2mobile_ul").append(html);
	});  
}
$(function(){
	$(".mui-icon-back").click(function(){
		history.go(-1);
	});
})
</script> 
</html>